<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 两数组合并后去重排序[1, 2, 4, 6, 7]
        let a = [5, 2, 6]
        let b = [3, 10, 4, 2, 7, 9]
        const c = [...new Set([...a, ...b])]
        c.sort(function (a, b) {
            return a - b
        })
        console.log(c);
        // console.log(d);
    </script>
</body>

</html>